package com.weiqiao.evaluate.service;


import com.weiqiao.evaluate.domain.Evluate4Entity;
import org.bson.Document;
import org.bson.conversions.Bson;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
* @author 胡家豪
* @date 2020-10-23
*/
public interface Evluate4Service {

    /**
    * 条件统计
    * @param company_id
    * @param filter
    * @return
    */
    int countNum(int company_id, Bson filter);

    /**
    * 分页查询热点列表
    * @param company_id
    * @param filter
    * @param pageable
    * @return
    */
    List<Evluate4Entity> findList(int company_id, Bson filter, Pageable pageable);

    /**
    * 获取详情
    * @param companyId
    * @param filter
    * @return
    */
    Evluate4Entity getEntity(int companyId, Bson filter);


    /**
    * 添加一条
    * @param company_id
    * @param json
    * @return
    */
    boolean addInfo(int company_id, String json);

    /**
    * 更新
    * @param company_id
    * @param filter
    * @param doc
    * @return
    */
    boolean updateInfo(int company_id, Bson filter, Document doc);


}